Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.golangci.yml: add intrange linter #3572

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

carpawell
Copy link
Member

It checks that go 1.22's range-over-numbers feature is not skipped. Also, fix some warnings it found.

pkg/core/mpt/helpers.go Outdated Show resolved Hide resolved
pkg/vm/vm.go Show resolved Hide resolved
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.79%. Comparing base (d47fe39) to head (f8549a4).
Report is 18 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3572      +/-   ##
==========================================
- Coverage   85.85%   85.79%   -0.06%     
==========================================
  Files         330      330              
  Lines       38537    38536       -1     
==========================================
- Hits        33085    33063      -22     
- Misses       3904     3928      +24     
+ Partials     1548     1545       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@carpawell carpawell force-pushed the feat/add-for-range-linter branch 2 times, most recently from ee5462c to 232a518 Compare September 4, 2024 01:40
@AnnaShaleva
Copy link
Member

BTW, there's a tiny typo in the second commit: mtp vs mpt.

It checks that go 1.22's range-over-numbers feature is not skipped. Also,
fix some warnings it found.

Signed-off-by: Pavel Karpy <[email protected]>
It took some time to understand why changing a regular `for` to a `range`
one leads to behavior changes; let it be more clear and explicit. Also, a
correct code is always better than a correct code with `nolint`.

Signed-off-by: Pavel Karpy <[email protected]>
@AnnaShaleva AnnaShaleva merged commit d9a6a7c into master Sep 5, 2024
19 of 20 checks passed
@AnnaShaleva AnnaShaleva deleted the feat/add-for-range-linter branch September 5, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants